//
//  HJWithdrawCell.m
//  project
//
//  Created by yefei on 2019/7/31.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJWithdrawCell.h"
@interface HJWithdrawCell ()

/**
 转账到什么
 */
@property (nonatomic,strong) UILabel * title;

/**
 处理状态
 */
@property (nonatomic,strong) UILabel * status;

/**
 时间
 */
@property (nonatomic,strong) UILabel * time;

/**
 单价
 */
@property (nonatomic,strong) UILabel * price;
@end


@implementation HJWithdrawCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.title];
        [self.contentView addSubview:self.status];
        [self.contentView addSubview:self.time];
        [self.contentView addSubview:self.price];
    }
    return self;
}

-(UILabel *)title {
    if (!_title) {
        _title = [UILabel new];
        _title.textColor = [UIColor colorWithHex:0x292929];
        _title.font = [UIFont systemFontOfSize:18];
        _title.text = @"提现至支付宝";
    }
    return _title;
}

-(UILabel *)status {
    if (!_status) {
        _status = [UILabel new];
        _status.textColor = [UIColor colorWithHex:0x808080];
        _status.font = [UIFont systemFontOfSize:15];
        _status.text = @"处理中";
    }
    return _status;
}

-(UILabel *)time {
    if (!_time) {
        _time = [UILabel new];
        _time.textColor = [UIColor colorWithHex:0x808080];
        _time.font = [UIFont systemFontOfSize:15];
        _time.text = @"2018/08/23";
    }
    return _time;
}

-(UILabel *)price {
    if (!_price) {
        _price = [UILabel new];
        _price.textColor = [UIColor colorWithHex:0xff240];
        _price.font = [UIFont systemFontOfSize:20];
        _price.text = @"+247";
    }
    return _price;
}

-(void)layoutSubviews {
    [super layoutSubviews];
    
    @weakify(self)
    [self.title mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self)
        make.top.equalTo(self.contentView).offset(13);
        make.left.equalTo(self.contentView).offset(18);
        make.height.mas_equalTo(17);
    }];
    
    [self.status mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self)
        make.centerY.equalTo(self.title);
        make.right.equalTo(self.contentView.mas_right).inset(18);
        make.height.mas_equalTo(17);
    }];
    
    [self.time mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self)
        make.left.equalTo(self.title.mas_left);
        make.bottom.equalTo(self.contentView.mas_bottom).inset(13);
        make.height.equalTo(@14);
    }];
    
    [self.price mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self)
        make.centerY.equalTo(self.time);
        make.right.equalTo(self.status.mas_right);
        make.height.equalTo(@19);
    }];
}

@end
